package es.us.lsi.daw.servicios;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;

public class NotifyingExceptionResolver extends SimpleMappingExceptionResolver {

	Logger			log	= LoggerFactory.getLogger(this.getClass());

	@Override
	protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {

		log.error("An Exception has occured in the application", ex);

		return super.doResolveException(request, response, handler, ex);
	}

}
